home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / gpt32src.zip / HP2648.TRM < prev    next >
Text File  |  1992-03-25  |  2KB  |  124 lines

  1. /*
  2.  * $Id: hp2648.trm,v 3.26 92/03/24 22:34:55 woo Exp Locker: woo $
  3.  */
  4.  
  5. /* GNUPLOT -  hp2648.trm */
  6. /*
  7.  * Copyright (C) 1990, 1991, 1992   
  8.  *
  9.  * Permission to use, copy, and distribute this software and its
  10.  * documentation for any purpose with or without fee is hereby granted, 
  11.  * provided that the above copyright notice appear in all copies and 
  12.  * that both that copyright notice and this permission notice appear 
  13.  * in supporting documentation.
  14.  *
  15.  * Permission to modify the software is granted, but not the right to
  16.  * distribute the modified code.  Modifications are to be distributed 
  17.  * as patches to released version.
  18.  *  
  19.  * This software  is provided "as is" without express or implied warranty.
  20.  * 
  21.  * This file is included by ../term.c.
  22.  *
  23.  * This terminal driver supports:
  24.  *  HP2648 and HP2647
  25.  *
  26.  * AUTHORS
  27.  *  Russell Lang
  28.  * 
  29.  * send your comments or suggestions to (info-gnuplot@ames.arc.nasa.gov).
  30.  * 
  31.  */
  32.  
  33. #define HP2648XMAX 720             
  34. #define HP2648YMAX 360
  35.  
  36. #define HP2648XLAST (HP2648XMAX - 1)
  37. #define HP2648YLAST (HP2648YMAX - 1)
  38.  
  39. #define HP2648VCHAR        12      
  40. #define HP2648HCHAR        7        
  41. #define HP2648VTIC        8
  42. #define HP2648HTIC        8
  43.  
  44.  
  45. HP2648init()
  46. {
  47.     fprintf(outfile,"\033*m1m1n136,1cZ");
  48. /*                   1     2 3     4
  49.     1. mode
  50.     2. textsize=1
  51.     3. textangle=1
  52.         4. define line type 2 to be *   *   *   * etc.
  53. */
  54. }
  55.  
  56.  
  57. HP2648graphics()
  58. {
  59.     fprintf(outfile,"\033*dacZ");
  60. /*                   1     23
  61.     1. mode
  62.     2. clear grahics screen
  63.     3. graphics video on
  64. */
  65. }
  66.  
  67.  
  68. HP2648text()
  69. {
  70. }
  71.  
  72.  
  73. HP2648linetype(linetype)
  74. int linetype;
  75. {
  76.     static int hpline[] = {1,7,1,4,5,6,8,9,10,7,2};
  77.     fprintf(outfile,"\033*m%dbZ",hpline[(linetype+2)%11]);
  78. }
  79.  
  80.  
  81. HP2648move(x,y)
  82. int x,y;
  83. {
  84.     fprintf(outfile,"\033*paf%d,%dZ",x,y);
  85.     /*               1     23     4
  86.     1    plot mode
  87.     2    "pen up"
  88.     3    goto absolute x,y
  89.     4    end command
  90.     */
  91. }
  92.  
  93.  
  94. HP2648vector(x,y)
  95. int x,y;
  96. {
  97.     fprintf(outfile,"\033*pbf%d,%dZ",x,y);
  98.     /*                     1 
  99.     1    "pen down"
  100.     */
  101. }
  102.  
  103.  
  104. HP2648put_text(x,y,str)
  105. int x, y;
  106. char *str;
  107. {
  108.     HP2648move(x,y-HP2648VCHAR/2 + 1);
  109.     fprintf(outfile,"\033*l%s\n",str);
  110. }
  111.  
  112.  
  113. int HP2648_text_angle(ang)
  114. int ang;
  115. {
  116.     fprintf(outfile,"\033*m%dnZ\n",ang+1);
  117.     return TRUE;
  118. }
  119.     
  120. HP2648reset()
  121. {
  122. }
  123.  
  124.